Skip to content

fix(capsule): align Windows translation badge and rail stacking with macOS - #1493

Merged
appergb merged 1 commit into
betafrom
fix/windows-capsule-translation-position-pr
Nov 26, 2026
Merged

appergb merged 1 commit into
betafrom
fix/windows-capsule-translation-position-pr

Conversation

@appergb

@appergb appergb commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Align Windows Classic capsule vertical stacking with macOS so the translation badge (CapsuleTranslationBadge) always sits at the very top (y = 12..40), above the live transcript rail (y = 48..100) and the capsule pill (y = 124..156).
  • Remove the Windows-only externalBadgeLane inversion in getClassicCapsuleGeometry and getCapsuleTranscriptRailPosition (openless-all/app/src/lib/capsuleLayout.ts).
  • Keep capsule_transcript_rail_position and capsule_control_hit_rect in openless-all/app/src-tauri/src/tauri_coordinator_host.rs in sync so the Windows SetWindowRgn hit/clip region covers the top translation badge without clipping it.

Testing

  • npm run build (prebuild, tsc, vite build)
  • npx tsx src/lib/capsuleLayout.test.ts
  • node scripts/windows-ui-config.test.mjs
  • npx prettier --check src/lib/capsuleLayout.ts src/lib/capsuleLayout.test.ts

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T05:31:57.143954Z 4e6b17c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4e6b17c05d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +181 to +185
let interactive_height = if picker_visible {
logical_body_height
+ 24.0
+ 28.0
+ if transcript_visible { 52.0 + 8.0 } else { 0.0 }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the transcript lane outside the capsule input region

On Windows, recording a translation with the live transcript visible now expands the interactive capsule region across the entire transcript lane: at 1× scale it spans x=100..360 and y=12..156, including the rail at y=48..100. Although the separate rail HWND ignores cursor events, the capsule HWND underneath does not: capsule_hit_test_subclass_proc passes hits inside this rectangle to DefSubclassProc. Consequently, clicking the center of the transcript or the transparent gap below it no longer reaches the application underneath. Use separate badge and body regions, with matching hit testing, rather than making the intervening transcript lane interactive.

Useful? React with 👍 / 👎.

@appergb
appergb merged commit bb27675 into beta Nov 26, 2026
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant